﻿using System.Net;
using Platformer_Example.Controller.Network.Messages;
using Transformable_Engine_v2.Engine.Network;
using Transformable_Engine_v2.Engine.Network.Interfaces;

namespace Platformer_Example.Controller.Network
{
    public abstract class BaseNetworkController
    {
        public NetworkServer AsServer()
        {
            return (this as NetworkServer);
        }
        public NetworkClient AsClient()
        {
            return (this as NetworkClient);
        }

        public delegate void OnMessageReceivedHandler<in T>(T message, IPAddress senderAddress) where T : class, INetworkSerializable;
        protected UdpNetworkClient NetworkController;
    }
}